Page({
  data: {
    starCount: 0,
    forksCount: 0,
    visitTotal: 0,
    favorCount:wx.getStorageSync('hy1_favor_list').length||0,
  },
  onShow(){
    this.setData({
      favorCount:wx.getStorageSync('hy1_favor_list').length||0,
    })
  },
  CopyLink(e) {
    console.log(11);
    wx.setClipboardData({
      data: e.currentTarget.dataset.link,
      success: res => {
        wx.showToast({
          title: '已复制',
          duration: 1000,
        })
      }
    })
  },
  showModal(e) {
    this.setData({
      modalName: e.currentTarget.dataset.target
    })
  },
  
  hideModal(e) {
    this.setData({
      modalName: null
    })
  },
  showQrcode() {
    wx.previewImage({
      urls: ['http://47.111.14.227:7001/public/39869f244825f.jpg'],
      current: 'http://47.111.14.227:7001/public/39869f244825f.jpg' // 当前显示图片的http链接      
    })
  },
})